<include file="Model:public_header" /> 


<style>






.active {border:3px dashed red; background:#eeeeee}
.mytable{ width:100%; display:table;  position:relative}
.mytable > div {width:100%;  display:table-row;height:30px; line-height:30px;  text-align:center}
.list_cell{ display:table-cell;  border:#CCC 1px solid;font-size:14px;}

.mytable > div{width:100%; height:30px;} 

</style>
<script>
$(document).ready(function(){
	new dragSort('ul1','cm_table_column','{:U("Model/changeListSort")}');
		
	new Fast_radio_set('ul1','cm_table_column','{:U('Model/ajax_set_is')}','__PUBLIC__/images/status0.png','__PUBLIC__/images/status1.png');
	
	//new dragSort('ul2','drag_span','{:U("Model/changeListSort")}');
});



</script>
<div class="content-box-header CM_header">
					
	<h3>
		<a href="{:U('Model/table_list')}">
			<font color="red"><<模型列表 &nbsp; &nbsp; &nbsp;</font>
		</a>		
		<font color="red">{$table.table_name}--</font>的字段列表
	</h3>
	
	<ul id="my_tab">
		<li><a id="" href="{:U('Model/add_table_column',array('table_id'=>$table['table_id']))}" >添加字段&nbsp;</a></li>
		<li><a id="" href="{:U('Model/Test_from',array('table_id'=>$table['table_id']))}" >  |  表单预览</a></li>
	</ul>
	
	<div class="clear"></div>
</div> 
				
				
<div class="content-box-content CM_boxList">
	
	<div class="tab-content default-tab" id="tab1">
		
		<div style="clear:both">
				
				<div id="ul1" class="dragSort">
					<div class="table_thead">
						<span class="drag_span"> <input type="checkbox"   class="SELECT_ALL"/> </span>
						<span class="drag_span"> ID</span>
						<span class="drag_span"> 字段名称</span>
						<span class="drag_span"> 字段描述</span>
						<span class="drag_span"> 字段类型</span>
						<span class="drag_span">  添加</span>
						<span class="drag_span">  编辑</span>
						<span class="drag_span">  列表</span>
						<span class="drag_span">  搜索</span>
						<span class="drag_span">操作</span>
						<span class="drag_span">排序</span>
					</div>
				<foreach name="tab_col_list" item="vo" key="key">
					<div class="table_row">
						<span  class="drag_span"> <input type="checkbox" value="{$vo.tab_col_id}"  /> </span>
						<span  class="drag_span"> {$vo.tab_col_id}</span>
						<span  class="drag_span"> {$vo.column_name}</span>
						<span  class="drag_span"> {$vo.column_desc}</span>
						<span  class="drag_span"> {$vo.column_type}</span>
						
						
						<span  class="drag_span">
							
								<img class="ajax_set" columnname="is_add" rowid="{$vo.tab_col_id}" val="{$vo.is_add}" src="__PUBLIC__/images/status{$vo.is_add}.png" />									
							
						</span>
						<span  class="drag_span">															
							<img class="ajax_set" columnname="is_edit" rowid="{$vo.tab_col_id}" val="{$vo.is_edit}" src="__PUBLIC__/images/status{$vo.is_edit}.png" />	
						</span>
						<span  class="drag_span">
							<if condition="($vo.column_type eq 'primaryKey') OR ($vo.column_type eq 'multiErea') OR ($vo.column_type eq 'multiPic') OR ($vo.column_type eq 'edictor') OR ($vo.column_type eq 'checkedbox') OR ($vo.column_type eq 'file') OR ($vo.column_type eq 'date_range') OR ($vo.column_type eq 'date_time_range')"> 
								<img src="__PUBLIC__/images/icons/exclamation.png" />
							<else />
								<img class="ajax_set" columnname="is_list" rowid="{$vo.tab_col_id}" val="{$vo.is_list}" src="__PUBLIC__/images/status{$vo.is_list}.png" />
							</if>
						</span>
						
						<span  class="drag_span">
							<if condition="($vo.column_type eq 'date_range') OR ($vo.column_type eq 'date_time_range') OR ($vo.column_type eq 'primaryKey') OR ($vo.column_type eq 'multiPic') OR ($vo.column_type eq 'edictor') OR ($vo.column_type eq 'checkedbox') OR ($vo.column_type eq 'file') OR ($vo.column_type eq 'multiErea') OR ($vo.column_type eq 'singlePic') OR ($vo.column_type eq 'map') "> 
								<img src="__PUBLIC__/images/icons/exclamation.png" />
							<else />
							<img class="ajax_set" columnname="is_search" rowid="{$vo.tab_col_id}" val="{$vo.is_search}" src="__PUBLIC__/images/status{$vo.is_search}.png" />
							</if>
						</span>
						
						<span  class="drag_span">
							<if condition="$vo.column_type neq 'primaryKey'">
							 <a href="{:U('Model/edit_column',array('tab_col_id'=>$vo['tab_col_id'],'table_id'=>$table['table_id']) ) }" title="修改"><img src="__PUBLIC__/images/icons/pencil.png" alt="Edit" /></a>
							</if> 
							 
							 <a onclick="return confirm('是否确定要删除该字段？');" href="{:U('Model/del_column',array('tab_col_id'=>$vo['tab_col_id'])) }" title="删除"><img src="__PUBLIC__/images/icons/cross.png" alt="Delete" /></a> 
						</span>
						
						<span  class="drag_span"> {$vo.cm_table_column_sort}</span>
					</div>
				</foreach>
				</div>
				

<!--
				<div class="mytable" id="ul2">
					<div class="row_wrap" >
						<span class="list_cell" > <input type="checkbox" value="{$vo.tab_col_id}"  class="SELECT_ALL"/> </span>
						<span class="list_cell">  ID</span>
						<span class="list_cell">  字段名称</span>
						<span class="list_cell">  字段描述</span>
						<span class="list_cell">  字段类型</span>
						<span class="list_cell">  添加</span>
						<span class="list_cell">  编辑</span>
						<span class="list_cell">  列表</span>
						
						<span class="list_cell">  操作</span>								
					</div>
				<foreach name="tab_col_list" item="vo" key="key">
				
					<div class="row_wrap" id="aa">
						<span class="list_cell"> <input type="checkbox" value="{$vo.tab_col_id}"  class="SELECT_ALL"/>  </span>
						<span class="list_cell">{$vo.tab_col_id}</span>
						<span class="list_cell">{$vo.column_name}</span>
						<span class="list_cell">{$vo.column_desc}</span>
						<span class="list_cell">{$vo.column_type}</span>
						
						<span class="list_cell">
							<if condition="$vo.is_add eq 0"><img rowid="{$vo.tab_col_id}" val="0" src="__PUBLIC__/images/cross_circle.png" /></if>
							<if condition="$vo.is_add eq 1"><img rowid="{$vo.tab_col_id}" val="1" src="__PUBLIC__/images/tick_circle.png" /></if>
						</span>
						<span class="list_cell">															
							<if condition="$vo.is_edit eq 0"><img val="0" src="__PUBLIC__/images/cross_circle.png" /></if>
							<if condition="$vo.is_edit eq 1"><img val="1" src="__PUBLIC__/images/tick_circle.png" /></if>
						</span>
						<span class="list_cell">
							
							<if condition="$vo.is_list eq 0"><img val="0" src="__PUBLIC__/images/cross_circle.png" /></if>
							<if condition="$vo.is_list eq 1"><img val="1" src="__PUBLIC__/images/tick_circle.png" /></if>
						</span>
					
						
						<span class="list_cell"> 
							<a href="{:U('Model/edit_column',array('tab_col_id'=>$vo['tab_col_id'],'table_id'=>$table['table_id']) ) }" title="修改"><img src="__PUBLIC__/images/icons/pencil.png" alt="Edit" /></a>
							</if> 
							 
							 <a onclick="return confirm('是否确定要删除该字段？');" href="{:U('Model/del_column',array('tab_col_id'=>$vo['tab_col_id'])) }" title="删除"><img src="__PUBLIC__/images/icons/cross.png" alt="Delete" /></a> 
						</span>
						
					</div>
				
				</foreach>
				</div>
-->		
				<div style="clear:both"></div>
			</div>
		</div> 
					
</div> 
		
		
<include file="Model:public_footer" /> 		
	